package cloud.ben.smallscalepigfarmmanagementsystem.entity.pig;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @Author: Ben
 * @Date: 2022/4/3 22:19
 */
@ApiModel(description = "育肥舍死亡记录信息表")
@TableName("pig_fattening_house_death_records")
@Data
public class PigFatteningHouseDeathRecords {


    /**
     * id
     */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(required = true,value = "id")
    private Integer id;


    /**
     * 育肥舍死亡记录时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(required = true,value = "育肥舍死亡记录时间")
    @NotNull(message = "育肥舍死亡记录时间为空")
    private Date fatteningHouseDeathTime;

    /**
     * 记录人员
     */
    @ApiModelProperty(required = true,value = "记录人员")
    @NotNull(message = "记录人员")
    private String registrationPerson;


    public PigFatteningHouseDeathRecords(Integer id, Date fatteningHouseDeathTime, String registrationPerson) {
        this.id = id;
        this.fatteningHouseDeathTime = fatteningHouseDeathTime;
        this.registrationPerson = registrationPerson;
    }

    public PigFatteningHouseDeathRecords(Date fatteningHouseDeathTime, String registrationPerson) {
        this.fatteningHouseDeathTime = fatteningHouseDeathTime;
        this.registrationPerson = registrationPerson;
    }

    public PigFatteningHouseDeathRecords() {
    }
}
